<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>React Hello word</title>
</head>
<body>
    <div id="app">

    </div>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
    <script type="text/babel">
        // 纯js创建
        // const str = 'hello react'
        // const vDom = React.createElement('h1',{id: 'myId'}, str)
        // console.log(document.getElementById('app'))
        // ReactDOM.render(vDom,document.getElementById('app'))

         // 虚拟dom
         const str = 'hello react'
        const vDom = <h1>{str}</h1>
        console.log(document.getElementById('app'))
        ReactDOM.render(vDom,document.getElementById('app'))
    </script>
</body>
</html>